package com.flaskpy.web.eternity.auth.jwt.service.impl;

import cn.hutool.core.util.StrUtil;
import com.flaskpy.web.eternity.auth.jwt.entiry.EyUserDetail;
import com.flaskpy.web.eternity.auth.jwt.entiry.JwtPayLoad;
import com.flaskpy.web.eternity.auth.jwt.service.IJwtAuthicationService;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class JwtUserDetailServiceImpl implements IJwtAuthicationService {


    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
        EyUserDetail result = new EyUserDetail();
        result.addAuthority("add","update");
        result.addRole("admin");
        return result;
    }


}
